
package upcoming.client;

public class UpcomingException extends RuntimeException
{
	private Response rsp;
	
	public UpcomingException(String msg)
	{
		super(msg);
	}
	
	public UpcomingException(String msg, Throwable cause)
	{
		super(msg, cause);
	}
	
	public UpcomingException(String msg, Response r)
	{
		super(msg);
		
		this.rsp = r;
		
	}
	
	/**
	 * 
	 * 
	 * @return may return null
	 * 
	 */
	public Response getResponse()
	{
		return this.rsp;
	}
	
	/**
	 * 
	 * @return may return null
	 * 
	 */
	public UpcomingError getUpcomingError()
	{
		if (this.rsp == null)
		{
			return null;
		}
		else
		{
			return this.rsp.getError();
		}
	}
	
}
